package com.hackathon2012_03_04.ryokocial;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * 繧ｵ繝�ロ繧､繝ｫ逕滓�繧ｵ繝ｼ繝薙せ
 */
public interface ThumbnailService {
    
    /**
     * 繧ｵ繝�ロ繧､繝ｫ繧剃ｽ懈�縺吶ｋ縲�
     * @param image 逕ｻ蜒上ョ繝ｼ繧ｿ
     * @return 菴懈�縺励◆繧ｵ繝�ロ繧､繝ｫ縺ｮID
     * @throws IOException
     */
    long create(byte[] image,
    		String picname,
            String user,
            ArrayList<String> tags,
            double lat,
            double lng
    );

    /**
     * 繧ｵ繝�ロ繧､繝ｫ繧貞叙蠕励☆繧九�
     * @param id 逕ｻ蜒淑d
     * @return 繧ｵ繝�ロ繧､繝ｫ
     * @throws IOException
     */
    Thumbnail getById(long id);
    Thumbnail getByPicName(String picname);
    Thumbnail getByUser(String user);
    Thumbnail getByTravel(String travel);
    Thumbnail getByTag(String tag);
    Thumbnail getByGeo(double lat,double lng);
    
    List<Thumbnail> search(String keyword,int i);
    
    /**逕ｻ蜒上し繧､繧ｺ*/
    enum Size {
        /**繧ｪ繝ｪ繧ｸ繝翫Ν*/
        ORIGINAL(-1,-1),

        SMALL(75,75);
        
        public final int width;
        /**鬮倥＆*/
        public final int height;
        
        private Size( int width,  int height ) {
            this.width = width;
            this.height = height;
        }
    }
}